// 数据状态的管理(记录/取值/修改/删除)
export default {
    namespaced: true,
    // 存数据
    state: {
      phone: '',
      userName: '',
      id:'',
      balance:0,
      touxiang:''
    },
    getters: {
  
    },
    // 修改数据
    mutations: {
      setPhone(state, value) {
        state.phone = value;
      },
      setUserName(state, value) {
        state.userName = value;
      },
      setId(state, value) {
        state.id = value;
      },
      setBalance(state, value) {
        state.balance = value;
      },
      setTouXiang(state, value) {
        state.touxiang = value;
      },
  
    },
    // 提交修改数据的方法(异步)
    actions: {
      setPhoneAsync(content,value){
        content.commit('setPhone',value)
      },
      setUserNameAsync(content,value){
        content.commit('setUserName',value)
      },
      setIdAsync(content,value){
        content.commit('setId',value)
      },
      setBalanceAsync(content,value){
        content.commit('setBalance',value)
      },
      setTouXiangAsync(content,value){
        content.commit('setTouXiang',value)
      },
    },
    modules: {
    }
  }
  